import { connect } from "dva";
import React, { useEffect } from "react";
import detail from "./Detail.css";
function Detail(props) {
  useEffect(() => {
    console.log(props);

    console.log(props.match.params.id);
    console.log("页面打开了");

    props.dispatch({
      type: "maizuo/hide",
    });
    return () => {
      console.log("页面关闭了");

      props.dispatch({
        type: "maizuo/show",
      });
    };
  }, []);

  return (
    <div>
      <div className={detail.lazy_img}>
        <img
          className={detail.target_img}
          src="https://pic.maizuo.com/usr/movie/ddcd623d6478bbc5d79811e66bd32e7d.jpg?x-oss-process=image/quality,Q_70"
        ></img>
      </div>
    </div>
  );
}
export default connect()(Detail);
